package com.godman.liu.loggingdemo.async;

import lombok.SneakyThrows;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class AsyncTask {

    @SneakyThrows
    @Async
    public void sayHello(){
        Thread.sleep(5000L);
        System.out.println("hello");
    }
}
